import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapred.JobConf;
import org.apache.hadoop.mapreduce.Partitioner;

public class ProvincePartitioner extends Partitioner<Lowmoney_FlowBean, Text> {
    @Override
    public int getPartition(Lowmoney_FlowBean Lowmoney_flowBean, Text text, int i) {

        String require_nums = text.toString().substring(0, 1);
        int a = 4;
        if ("5".equals(require_nums)) {
            a = 0;
        } else if ("6".equals(require_nums)) {
            a = 1;
        } else if ("7".equals(require_nums)) {
            a = 2;
        } else if ("8".equals(require_nums)) {
            a = 3;
        }
        return a;

      }
    }